<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@page import="web.*"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<SCRIPT type="text/javascript" src="../outils/dhtmlgoodies_calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.js?random=20060118"></script>
<link type="text/css" rel="stylesheet" href="../outils/dhtmlgoodies_calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.css?random=20051112" media="screen"></link>


<script type="text/javascript" src="../outils/div.js"></script>
<title>Votre devis en ligne</title>

</head>
<body>
<!--  -->
<% web.Devis d = Devis.getInstance(); %>
<% 
if(request.getParameter("etape")==null) { %>
	 <jsp:forward page="devis.jsp?etape=choixemplacement1"/>

<%}
//---------------------------------------------- ETAPE 1 -------------------------------------------------------------------------

if (request.getParameter("etape").compareToIgnoreCase("choixemplacement1")==0) {

%>

<div id="etape1"> 
<form name="typeemplacement" action="devis.jsp?etape=periode2" method="post">
Etape 1: S&eacute;lectionnez le type d'emplacement
<br>
<br>
<% d.etape1();
out.println("type="+d.type);
out.println("sdatedebut="+d.sdatedebut);
out.println("sdatefin="+d.sdatefin);

for(int i = 0; i < d.typeemplacement.size(); i++)
{
	
        out.println("<input type='radio' name='type' value='"+d.typeemplacement.get(i).id+"'> " + d.typeemplacement.get(i).nom + "<br>");
}      

%>
<br>
<INPUT border=0 src="../images/etapesuivante.png" type=image Value=submit > 
</form>
</div>
<% } %>
<% 
//---------------------------------------------- ETAPE 2 -------------------------------------------------------------------------
if (request.getParameter("etape").compareToIgnoreCase("periode2")==0) {
	
%>
<!--  -->
<div id="etape2" > 
<% 
if(d.type==null && request.getParameter("type")==null) { 

%>
	 <jsp:forward page="devis.jsp?etape=choixemplacement1"/>

<%}
else d.type=request.getParameter("type");
%>
<form name="periode" action="devis.jsp?etape=disponibilite3" method="post">
<% 
d.etape2(); 
out.println("type="+d.type);
out.println("sdatedebut="+d.sdatedebut);
out.println("sdatefin="+d.sdatefin);
%>

Etape 2: S&eacute;lectionnez la p&eacute;riode de location

<br/>
<br/>
<table>
<tr><td>Date de debut</td><td>- ></td><td>Date de fin</td></tr>
<tr><td><input type="text" readonly name="theDate2" onclick="displayCalendar(document.forms[0].theDate2,'dd/mm/yyyy',this)"></td><td>- ></td><td><input type="text" readonly name="theDate3" onclick="displayCalendar(document.forms[0].theDate3,'dd/mm/yyyy',this)"></td></tr>
	
</table>
<br/>
<a href="devis.jsp?etape=choixemplacement1"><img src="../images/retour.png" border=no alt="Retour"></a>

<INPUT border=0 src="../images/etapesuivante.png" type=image Value=submit > 
</form>
</div>



<% } %>
<% 
//---------------------------------------------- ETAPE 3 -------------------------------------------------------------------------
if (request.getParameter("etape").compareToIgnoreCase("disponibilite3")==0) {
%>
<!--  -->
<div id="etape3" > 
<% 

out.println("sdatedebut="+request.getParameter("TheDate2"));
out.println("sdatefin="+request.getParameter("TheDate3"));
if((d.sdatedebut==null || d.sdatefin ==null)){
	if(request.getParameter("theDate2")==null || request.getParameter("theDate3")==null){
		%>
		
		 <jsp:forward page="devis.jsp?etape=periode2&grrr=2"/>
		 
	<%
	}
	else {
		d.sdatedebut=request.getParameter("TheDate2");
		d.sdatefin=request.getParameter("TheDate3");
	}
}		
%>
<% 
d.etape3(); 
out.println("type="+d.type);
out.println("sdatedebut="+d.sdatedebut);
out.println("sdatefin="+d.sdatefin);
out.println("sdatedebut="+request.getParameter("TheDate2"));
out.println("sdatefin="+request.getParameter("TheDate3"));
%>

Etape 3: Voici les disponibilit&eacute;s pour la p&eacute;riode du <% %> au <% %>.

<a href="devis.jsp?etape=periode2"><img src="../images/retour.png" border=no alt="Retour"></a>

<INPUT border=0 src="../images/etapesuivante.png" type=image Value=submit > 

</div>
<% } %>
<% 
if (request.getParameter("etape").compareToIgnoreCase("4")==0) {
%>
<!--  -->
<div id="etape4"> 
etape4!

<a href="javascript:cachedemasque('etape4','etape3');"><img src="..\images\retour.png" border=no alt="Retour"></a>

<a href="javascript:cachedemasque('etape4','etape5');"><img src="..\images\etapesuivante.png" border=no alt="Passez a l'etape suivante"></a>

</div>
<% } %>
<% 
if (request.getParameter("etape").compareToIgnoreCase("5")==0) {
%>
<!--  -->
<div id="etape5"> 
etape5!

<a href="javascript:cachedemasque('etape5','etape4');"><img src="..\images\retour.png" border=no alt="Retour"></a>

<a href="javascript:cachedemasque('etape5','etape6');"><img src="..\images\etapesuivante.png" border=no alt="Passez a l'etape suivante"></a>

</div>
<% } %>
<% 
if (request.getParameter("etape").compareToIgnoreCase("6")==0) {
%>
<!--  -->
<div id="etape6" style="display:none"> 
etape6!

<a href="javascript:cachedemasque('etape6','etape5');"><img src="..\images\retour.png" border=no alt="Retour"></a>
<a href="./reservation.jsp">R&eacute;servez maintenant!</a>
</div>
<% }%>



</body>
</html>